const {createApp} = Vue
const {createWebHashHistory, createRouter} = VueRouter
import Main from './main.js'

const routes = [
    {path: '/', component: () => import('./home/home-view.js')},
    {path: '/codegen', component: () => import('./codegen/codegen-view.js')},
    {path: '/about', component: () => import('./about/about-view.js')},
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
window.router = router

const app = createApp(Main)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router)
app.use(ElementPlus);
app.mount('#app')
